﻿using Microsoft.AspNetCore.App;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;

namespace Host
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var builder = WebApplication.CreateBuilder(args);
            //构建容器，日志，配置，
            var app = builder.Build();

            ////构建中间件
            app.UseRouting();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapGet("/", async context =>
                {
                    await context.Response.WriteAsync("你好啊");
                    Console.WriteLine("hello world!");
                });
            });
            app.Run();
        }
    }
}